<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/site/workguide.js?time=' + sys_get_time();
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			<#if isUsing?? && isUsing>
				addFilesUploadEvent_workguide();
			</#if>
		}
	});
});
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<div class="widget" style="width:450px; float:left;">
	<div class="widget-header">
		<h3 class="title"><i class="fontello-icon-th-list-1"></i> 编辑办事指南机构或项目</h3>
	</div>
	<div class="widget-content">
		<div class="widget-content">
			<div class="table-title">
				<form id="editCategoryForm">
					<table class="table boo-table">
						<tr>
							<td>机构名称或项目名 </td>
							<td>
								<input type="text" id="name" name="name" value="${(info.name)!''}"/>
								<input type="hidden" name="code" value="${(info.code)!''}"/>
							</td>
						</tr>
						<tr>
							<td>所属机构或项目</td>
							<td>
								<div >
									<input type="text" id="pn" name="pn" readonly="readonly" value="${(info.pn)!'0'}"/>
									<input type="hidden" id="pc" name="pc" value="${(info.pc)!'0'}"/>
									<button class="btn btn-primary" onclick="javascript: selectCategory();" title="选择商品类型" type="button"><i class="icon-search"></i></button>
									<button class="btn btn-danger" onclick="javascript: $('#pn').val('0'); $('#pc').val('');" title="重置" type="button"><i class="icon-remove"></i></button>
								</div>
							</td>
						</tr>
					<#if isUsing?? && isUsing>
							<input type="hidden" id="aisn" name="wgd.aisn" style="width:300px;" value="${(info.name)!''}" />
							<input type="hidden" name="wgd.code" value="${(wgd.code)!''}" />
							<input type="hidden" name="wgd.wgpc" value="${(wgd.wgpc)!''}" />
						<tr>
							<td class="table-left" style="width:120px;">受理机构</td>
							<td><input type="text" id="ao" name="wgd.ao"  style="width:300px;" value="${(wgd.ao)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">事项类型</td>
							<td><input type="text" id="type" name="wgd.type"  style="width:300px;" value="${(wgd.type)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">审批时限</td>
							<td><input type="text" id="at" name="wgd.at" style="width:120px;" value="${(wgd.at)!''}" />个工作日</td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">法律依据</td>
							<td><input type="text" id="lb" name="wgd.lb"  style="width:300px;" value="${(wgd.lb)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">申报条件</td>
							<td><input type="text" id="dc" name="wgd.dc"  style="width:300px;" value="${(wgd.dc)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">审批程序</td>
							<td><textarea type="text" id="ap" name="wgd.ap"  style="width:300px;" >${(wgd.ap)!''}</textarea></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">所需材料</td>
							<td><textarea type="text" id="mn" name="wgd.mn" style="width:300px;"  >${(wgd.mn)!''}</textarea></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">收费标准</td>
							<td><input type="text" id="cs" name="wgd.cs" style="width:120px;" value="${(wgd.cs)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">收费依据</td>
							<td><input type="text" id="sb" name="wgd.cb" style="width:300px;" value="${(wgd.cb)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left" style="width:120px;">所出证照</td>
							<td><input type="text" id="sl" name="wgd.sl"  style="width:300px;" value="${(wgd.sl)!''}" /></td>
						</tr>
						<tr>
							<td class="table-left">所需表格<a id="uploadFilesBtn" href="javascript:;" >[选择]</a></td>
							<td id="annexListTable">
								<#if list??>
									<#list list as wga>
										<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
											<input type="hidden" name="wgd.list[${wga_index}].code" value="${wga.code}" />
											<button type="button" class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
											<a class="title" target="_blank" href="${contextPath}upload/workGuideDetailAnnex/${wga.sn}.${wga.ext}">${wga.name}</a>
										</div>
									</#list>
								</#if>
							</td>
						</tr>
					</#if>
					</table>
				</form>
			</div>
			<div>
				<ul>
					<li style="text-align:center; margin-top: 10px;">
						<a href="#" class="btn btn-info" onclick="javascript:checkedWorkguide();"> 
							<i class="fontello-icon-floppy"></i>&nbsp;保&nbsp;&nbsp;存
						</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="#" class="btn btn-info" onclick="javascript:editCategory('','');; return false;">
							<i class="fontello-icon-block"></i>&nbsp;重&nbsp;&nbsp;置
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>



<div id="tempAnnexListDiv" style="display:none;">
	<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
		<input class="name" type="hidden" />
		<input class="size" type="hidden" />
		<input class="sn" type="hidden"  />
		<input class="ext" type="hidden"  />
		<input class="afcs" type="hidden" name="afcs"  />
		<button type="button" class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
		<a class="title" href="#"></a>
	</div>
</div>
<input type="hidden" id="workguidedetail_an_index" value="${(list?size)!'0'}" />
